<?php
/**
 * Abstract wrapper class for a result row or new row.
 */
abstract class OORDBWrapper implements IteratorAggregate
{
	/**
	 * Retrieve the object representing this row of data.
	 * @return object Object representing the row
	 */
	abstract public function object();
	
	/**
	 * Save this row with values from its representing object.
	 */
	abstract public function save();
	
	/**
	 * Remove this row from the table.
	 */
	abstract public function remove();
	
	/**
	 * Retrieve an iterator over the fields' values.
	 * @return Iterator Iterator over row values
	 */
	abstract public function values();
	
	/**
	 * Get the table associated with this row.
	 * @return OORDBTable Table containing this row
	 */
	abstract public function table();
	
	/**
	 * Get an iterator across all the row values.
	 * @return Iterator Iterator across the row values
	 */
	public function getIterator()
	{
		return $this->values();
	}
}
?>